from bs4 import BeautifulSoup
#
# s = "<form name='easypaysubmit' id='easypaysubmit' target='_blank' method='post' " \
#     "action='http://121.43.169.97:8000/muser/publicRequests'><input name='Version' type='hidden' value='10'/><input name='CmdId' type='hidden' value='UserRegister'/><input name='MerCustId' type='hidden' value='6000060007313892'/><input name='BgRetUrl' type='hidden' value='https://www.baidu.com/'/><input name='RetUrl' type='hidden' value='http://user-p2p-test.itheima.net/trust/chinapnr/register/return/22110211563595886218'/><input name='UsrId' type='hidden' value=''/><input name='UsrName' type='hidden' value=''/><input name='IdType' type='hidden' value='00'/><input name='IdNo' type='hidden' value='110101199003077424'/><input name='UsrMp' type='hidden' value='13211110001'/><input name='UsrEmail' type='hidden' value=''/><input name='MerPriv' type='hidden' value='22110211563595886218'/><input name='ChkValue' type='hidden' value='-101'/><input name='CharSet' " \
#     "type='hidden' value='UTF-8'/></form><script>document.forms['easypaysubmit'].submit();</script>"
# bs = BeautifulSoup(s, "html.parser")
# print(bs.form["name"])
# path = "E:\\T\\Picture\\jdlingyu\\动漫\\"
# html = requests.get("https://www.jdlingyu.com/dm/acg?post_order=views").text
# bs = BeautifulSoup(html, "html.parser")
# albums = bs.find_all("a", attrs={"rel": "nofollow"})
# name = 0
# for a in albums[:6]:
#     href = a["href"]
#     html1 = requests.get(href).text
#     # print(html1)
#     bs1 = BeautifulSoup(html1, "html.parser")
#     pics = bs1.find("img", class_="po-img-big")
#     # print(pics)
#     src = pics["src"]
#     data = requests.get(src).content
#     name += 1
#     with open(path + f"{name}.jpg", "wb") as f:
#         f.write(data)
